package com.shensi.adminCollect.enums.station;

/**
 * 实体卡状态（0正常 1冻结 2注销）
 * */
public enum CardStatusEnum {

    NORMAL("0","正常"),
    FREEZE("1","冻结"),
    LOG_OFF("2","注销"),
    ;

    private String code;

    private String text;

    CardStatusEnum(String code, String text){
        this.code = code;
        this.text = text;
    }

    public static CardStatusEnum getCardStatusEnum(String parameter){
        for (CardStatusEnum value : CardStatusEnum.values()) {
            if(value.getCode().equals(parameter) || value.getText().equals(parameter)){
                return value;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
